<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="/WEB-INF/template/common/taglibs.jspf" %>
<es:contentHeader/>

<t:base type="jquery,jquery-ui-bootstrap:bootstrap,jquery-ui-bootstrap:jquery-ui,query-ui-bootstrap:jquery.layout,jquery-ui-bootstrap:font-awesome"></t:base>
<t:base type="bootstrap-datetimepicker,nicescroll,jqueryValidate,application,common,datePicker"></t:base>


<%--<link rel="stylesheet" href="<%=request.getContextPath()%>/resources/plug-in/bootstrap/css/bootstrap.min.css">--%>

<style type="text/css">
    .error {
        color: red;
    }
</style>

<div class="panel">
    <form:form id="editForm" method="post" commandName="m" cssClass="form-inline form-horizontal form-small">
        <es:showGlobalError commandName="m"/>
        <form:hidden path="id"/>
        <div id="baseinfo">
            <h4 class="hr">基本信息</h4>

            <div class="control-group span4">
                <form:label path="sendtime" cssClass="control-label" readonly="true">订单编号</form:label>
                <div class="controls">
                    <form:input path="saleordercode" placeholder="" readonly="true"/>
                </div>
            </div>

            <div class="control-group span4">
                <form:label path="netvalue" cssClass="control-label" readonly="true">净值</form:label>
                <div class="controls">
                    <form:input path="netvalue" placeholder="" readonly="true"/>
                </div>
            </div>

            <div class="control-group span4">
                <form:label path="rdedate" cssClass="control-label" readonly="true">请求交货日期</form:label>
                <div class="controls">
                    <form:input path="rdedate" placeholder="" readonly="true"/>
                </div>
            </div>

            <div class="control-group span4">
                <form:label path="latestdate" cssClass="control-label" readonly="true">最晚货好日期</form:label>
                <div class="controls">
                    <form:input path="latestdate" placeholder="" readonly="true"/>
                </div>
            </div>

            <div class="control-group span4">
                <form:label path="totalweight" cssClass="control-label" readonly="true">总重量</form:label>
                <div class="controls">
                    <form:input path="totalweight" placeholder="" readonly="true"/>
                </div>
            </div>

            <div class="control-group span4">
                <form:label path="priceclause" cssClass="control-label" readonly="true">价格条款</form:label>
                <div class="controls">
                    <form:input path="priceclause" placeholder="" readonly="true"/>
                </div>
            </div>
            <div class="control-group span4">
                <form:label path="paymentmethod" cssClass="control-label" readonly="true">支付方式</form:label>
                <div class="controls">
                    <form:input path="paymentmethod" placeholder="" readonly="true"/>
                </div>
            </div>







            <div class="control-group span4">
                <form:label path="sendtime" cssClass="control-label" readonly="true">发送时间</form:label>
                <div class="controls">
                    <form:input path="sendtime" placeholder="" readonly="true"/>
                </div>
            </div>




            <div class="control-group span4">
                <form:label path="ordertype" cssClass="control-label">订单类型</form:label>
                <div class="controls">
                    <form:input path="ordertype" name="ordertype"/>
                </div>
            </div>

            <div class="control-group span4">
                <form:label path="customer" cssClass="control-label">售达方</form:label>
                <div class="controls">
                    <form:input path="customer"/>
                </div>
            </div>

            <div class="control-group span4">
                <form:label path="receiver" cssClass="control-label">送达方</form:label>
                <div class="controls">
                    <form:input path="receiver" id="receiver" readonly="true"/>
                </div>
            </div>





        </div>


        <c:if test="${op eq '新增'}">
            <c:set var="icon" value="icon-file-alt"/>
        </c:if>
        <c:if test="${op eq '修改'}">
            <c:set var="icon" value="icon-edit"/>
        </c:if>
        <c:if test="${op eq '删除'}">
            <c:set var="icon" value="icon-trash"/>
        </c:if>

        <div class="control-group left-group">
            <div>
                <%--<button type="submit" id="sub" class="btn btn-primary">--%>
                    <%--<i class="${icon}"></i>--%>
                        <%--${op}--%>
                <%--</button>--%>
                <a href="javascript:self.location=document.referrer;" class="btn">
                    <i class="icon-reply"></i>
                    返回
                </a>
            </div>
        </div>
    </form:form>

    <div style="clear: both"></div>

    <div class="table-responsive" >
        <table class="table table-bordered table-hover"  style="white-space: nowrap">

            <thead>
            <tr>
                <th>产品编码</th>
                <th>品牌</th>
                <th>规格描述</th>
                <th>花纹+速度</th>
                <th>认证</th>
                <th>装箱量</th>
                <th>申请数量</th>
                <%--<th>分箱数量</th>--%>
                <th>填箱规格</th>
                <th>甩箱规格</th>
                <th>分货时间</th>

            </tr>
            </thead>

            <c:forEach items="${saleOrderItems}" var="m">
                <tr>

                    <td>${m.saleorderitemcode}</td>
                    <td>${m.brand}</td>
                    <td>${m.standard}</td>
                    <td>${m.patternspeed}</td>
                    <td>${m.authentication}</td>
                    <td>${m.packingqty}</td>

                    <td>${m.planquty}</td>


                    <td>${m.fillsigna}</td>
                    <td>${m.fillsignb}</td>

                    <td>${m.pickingtime}</td>



                </tr>
            </c:forEach>
        </table>
    </div>



</div>



<es:contentFooter/>

<%--<%@include file="/WEB-INF/template/common/admin/import-sys-js.jspf" %>--%>


<script type="text/javascript">

    jQuery.validator.addMethod("isMobile", function (value, element) {
        var length = value.length;
        var mobile = /^(13[0-9]{9})|(18[0-9]{9})|(14[0-9]{9})|(17[0-9]{9})|(15[0-9]{9})$/;
        return this.optional(element) || (length == 11 && mobile.test(value));
    });

    $(function () {
        $("#editForm").validate({
            rules: {
                username: {
                    required: true,
                    rangelength: [2, 20],
                    remote: {
                        url: "<%=request.getContextPath()%>/admin/rechargeBill/validate",
                        type: "post",
                        dataType: "json",
                        data: {
                            username: function () {
                                return $("#username").val();
                            },
                            id: $("#id").val(),
                        },
                        dataFilter: function (data, type) {
                            if (data == "pass")
                                return true;
                            else
                                return false;
                        }
                    }
                },
                email: {
                    required: true,
                    email: true,
                    remote: {
                        url: "<%=request.getContextPath()%>/admin/rechargeBill/validate",
                        type: "post",
                        dataType: "json",
                        data: {
                            email: function () {
                                return $("#email").val();
                            },
                            id: $("#id").val(),
                        },
                        dataFilter: function (data, type) {
                            if (data == "pass")
                                return true;
                            else
                                return false;
                        }
                    }
                },
                mobilePhoneNumber: {
                    required: true,
                    isMobile: true,
                    remote: {
                        url: "<%=request.getContextPath()%>/admin/rechargeBill/validate",
                        type: "post",
                        dataType: "json",
                        data: {
                            mobilePhoneNumber: function () {
                                return $("#mobilePhoneNumber").val();
                            },
                            id: $("#id").val(),
                        },
                        dataFilter: function (data, type) {
                            if (data == "pass")
                                return true;
                            else
                                return false;
                        }
                    }
                },
                password: {
                    required: true,
                    minlength: 5,
                },
                fullName: {
                    required: true,
                    minlength: 2,
                    maxlength: 20,
                },
                employeeId: {
                    remote: {
                        url: "<%=request.getContextPath()%>/admin/rechargeBill/validate",
                        type: "post",
                        dataType: "json",
                        data: {
                            employeeId: function () {
                                return $("#employeeId").val();
                            },
                            id: $("#id").val(),
                        },
                        dataFilter: function (data, type) {
                            if (data == "pass")
                                return true;
                            else
                                return false;
                        }
                    },
                    required: true,
                    digits: true,
                    minlength: 5,
                    maxlength: 5,
                }
            },
            messages: {
                username: {
                    required: "请输入用户名",
                    rangelength: "5-20个汉字，字母或下划线",
                    remote: "输入的用户名已经存在"
                },
                email: {
                    required: "请输入邮箱",
                    email: "输入正确的邮箱",
                    remote: "邮箱已注册"
                },
                mobilePhoneNumber: {
                    required: "请输入手机号",
                    remote: "手机号已注册",
                    isMobile: "输入正确的手机号"
                },
                password: {
                    required: "请输入密码",
                    minlength: "密码长度至少为5"
                },
                employeeId: {
                    digits: "只能输入5位数字",
                    required: "员工编号不能为空",
                    remote: "该员工编号已经使用"
                },
                fullName: {
                    required: "请输入您的姓名"
                }
            }
        });
    });
    $(function () {
        $("#editForm").submit(function () {
            var flag = $("#editForm").valid();
            if (!flag) {
                return false;
            }
        });
    });
</script>